package cn.schoolwow.quickflow.test.module.business.log;

import cn.schoolwow.quickflow.QuickFlow;
import cn.schoolwow.quickflow.QuickFlowBuilder;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import org.junit.Test;

public class FlowLogTestCase {
    private QuickFlow quickFlow = QuickFlowBuilder.newInstance();

    @Test
    public void setFlowLogIdTest(){
        quickFlow.startFlow(new BusinessFlow() {
            @Override
            public void executeBusinessFlow(FlowContext flowContext) throws Exception {
                flowContext.log("日志记录1");
                flowContext.log("日志记录2");
                flowContext.log("日志记录3");
                flowContext.log("日志记录4");
                System.out.println(flowContext.getLog());
            }

            @Override
            public String name() {
                return "记录日志";
            }
        }).execute();
    }
}
